﻿// ToLiss Captain Right DU
#pragma once
#include <stdio.h>
#include<graphics.h>
#include <conio.h>
#include <math.h>
#include <windows.h>

#ifndef M_PI
#define M_PI 3.1415926535
#endif
void drawND1(double x, double y, double width, double height, double size, double angle, double VOR1HL, double VOR2HL, double VOR1D, double VOR2D, double GS, double TAS, double WinV, double WinD, double hight, double Rdirection, double pitch, double VOR1,double VOR2);
void drawNAV(double x1, double y1, double width1, double height1, int baseX, int baseY, int width, int height, int choice, double heigh, double current_heading, double GS, double TAS, double WinV, double WinD, double VOR1HL, double VOR2HL, double VOR1D, double VOR2D, double Rdirection,double angle, double VOR1, double VOR2);
void drawVOR(double x1, double y1, double width, double height, double x, double y, double r, double angle, double choice, double GS, double TAS, double WinV, double WinD, double VOR1HL, double VOR2HL, double VOR1D, double VOR2D, double Rdirection, double VOR1, double VOR2);
void drawLS(double x1, double y1, double width, double height, double x, double y, double r, double angle, double choice, double GS, double TAS, double WinV, double WinD, double VOR1HL, double VOR2HL, double VOR1D, double VOR2D, double Rdirection, double VOR1, double VOR2);
// zwj

void GsTAs(double x, double y, double width, double height, double size, double GS, double TAS, double WinV, double WinD);
void drawArc(double x, double y, double width, double height, double angle, double size);
void drawPlane(double x, double y, double width, double height, double size);
void drawULine(double x, double y, double width, double height, double angle, double size);
void drawdialFrame(double x, double y, double width, double height, double size);
void VOR2(double x, double y, double width, double height, double size, int choice, double VOR2HL,double VOR1, double VOR2);
void VOR1(double x, double y, double width, double height, double size, int choice, double VOR1HL, double VOR1,double VOR2);
void PPOS(double x, double y, double width, double height, double size);
void drawADF1(double x, double y, double width, double height, double size);
void drawADF2(double x, double y, double width, double height, double size);
void greenLine(double x, double y, double width, double height, double size, double Rdirection);
void drawVor1(double x, double y, double width, double height, double size, double VOR1D, double angle);
void drawVor2(double x, double y, double width, double height, double size, double VOR2D, double angle);
double virtuel(double angle);
void printNum(double x, double y, double width, double height, double angle, double size, int choice);
// wyq
void Point(double CENTER_X, double CENTER_Y, double DIAL_RADIUS, double scaleFactor);
void drawInvertedTrianglesOnCircle(double CENTER_X, double CENTER_Y, double DIAL_RADIUS, double scaleFactor, double angle);
void dashedline(double CENTER_X, double CENTER_Y, double DIAL_RADIUS, double scaleFactor, double choice, double target_heading);
void drawInnerScaleAndNumbers(double CENTER_X, double CENTER_Y, double DIAL_RADIUS, double scaleFactor, double target_heading);
void drawPlaneVOR(double CENTER_X, double CENTER_Y, double DIAL_RADIUS, double scaleFactor, double size);
void drawPlaneNAV(int baseX, int baseY, int width, int height);
void drawF(double x, double y, double width, double height, double size);
void greenLineNAV(double x, double y, double width, double height, double size, double Rdirection);
void greencube(double x, double y, double width, double height, double size, double Rdirection);
void drawMovePlane(double x, double y, double width, double height, double size, double angle);
double virtuel(double angle);
void drawScaleBarWithPointerNAV1(int baseX, int baseY, int width, int height, int currentValue);
void drawInnerScaleAndNumbersLS(double CENTER_X, double CENTER_Y, double DIAL_RADIUS, double scaleFactor, double target_heading);

#define M_PI 3.1415926535

// 定义表盘半径比例
#define DIAL_RADIUS_RATIO 0.323
// 定义圆心位置比例
#define CENTER_X_RATIO 0.5
#define CENTER_Y_RATIO 0.388

void drawPointsNAV(int baseX, int baseY, int width, int height);
void drawInvertedTrianglesOnCircleNAV(int baseX, int baseY, int width, int height, double dialRadius, double centerX, double centerY);
void dashedlineNAV(int baseX, int baseY, int width, int height, int choice, double target_heading);
void drawDashedLinesNAV(int baseX, int baseY, int width, int height, int choice, double target_heading);
void drawInnerScaleAndNumbersNAV(int baseX, int baseY, int width, int height, double centerX, double centerY, double dialRadius, double target_heading);
void drawScaleBarWithPointerNAV(int baseX, int baseY, int width, int height, int currentValue);
void drawDashedLineNAV(int baseX, int baseY, int width, int height);
void drawAirplane(float centerX, float centerY, float pitchAngle, float scale);
void rotatePoint(float pointX, float pointY, float centerX, float centerY, float angle, float* outX, float* outY);

void drawInvertedTrianglesOnCirclePLAN(double x, double y, double w, double h);
void dashedlinePLAN(double x, double y, double w, double h, int choice, int target_heading);
void drawInnerScaleAndNumbersPLAN(double x, double y, double w, double h, double target_heading);
void drawPLAN(double x, double y, double width, double height, double current_heading, double GS, double TAS, double WinV, double WinD);
void drawMovePlanePLAN(double x, double y, double width, double height, double size, double angle);